package com.csc.dao;

import java.sql.Connection;
import java.sql.DriverManager;

public class ODBCDAOFactory extends DAOFactory {
	
	public static final String DRIVER=
	    "sun.jdbc.odbc.JdbcOdbcDriver";
	public static final String DBURL=
		"jdbc:odbc:bookDB";
	public static Connection createConnection() {
		Connection con = null;
		try {
			Class.forName(DRIVER);
			con = DriverManager.getConnection(DBURL, "", "");
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return con;
	  }
	  
	@Override
	public BookDAO createBookDao() {
		return new BookDAOImpl();
	}

}
